package com.dlc.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.dto.ShopCustomerDTO;
import com.dlc.shop.bean.model.Order;
import com.dlc.shop.bean.model.ShopCustomer;
import com.dlc.shop.bean.vo.ShopCustomerVO;
import com.dlc.shop.common.util.PageParam;

import java.util.List;

/**
 *
 *
 * @author LGH
 * @date 2023-01-12 10:37:54
 */
public interface ShopCustomerService extends IService<ShopCustomer> {

    /**
     * 通过订单创建店铺客户
     * @param orders 订单列表
     */
    void saveCustomerByOrders(List<Order> orders);

    /**
     * 搜索条件分页查询客户列表
     * @param page
     * @param shopCustomer
     * @return
     */
    IPage<ShopCustomerVO> pageShopCustomerByParam(PageParam<ShopCustomerVO> page, ShopCustomerDTO shopCustomer);

    /**
     * 获取用户是否为店铺客户
     * @param shopId
     * @param userId
     * @return
     */
    ShopCustomerVO getIsShopCustomer(Long shopId, String userId);


}
